﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Reservoir.WebSite.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no" />
    <title>登录页</title>
    <script src="scripts/jquery.js"></script>
    <script>
        $(function () {
            //图形验证码点击刷新
            var captcha = $('.captcha');
            var captchaSrc = captcha.attr('src')
            captcha.on('click', function () {
                $(this).attr('src', captchaSrc + '?r=' + Math.random());
            });
        });
</script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <label>姓名：</label>
            <asp:TextBox ID="txtName" MaxLength="16" TextMode="SingleLine" runat="server" PlaceHolder="请输入姓名"></asp:TextBox>
            <asp:RequiredFieldValidator ID="rfvName" runat="server" ErrorMessage="姓名不能为空" ControlToValidate="txtName"></asp:RequiredFieldValidator>
        </div>
        <div>
            <label>密码：</label>
            <asp:TextBox ID="txtPassword" MaxLength="32" TextMode="Password" runat="server" PlaceHolder="请输入密码"></asp:TextBox>
            <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ErrorMessage="密码不能为空" ControlToValidate="txtPassword"></asp:RequiredFieldValidator>
        </div>
        <div>
            <label>验证码</label>
            <asp:TextBox ID="txtVerification" MaxLength="32" runat="server" PlaceHolder="请输入验证码"></asp:TextBox>
            <asp:Image ID="Image1" class="captcha" runat="server" ImageUrl="~/vCode.ashx" />
            <asp:RequiredFieldValidator ID="rfvVerification" runat="server" ErrorMessage="验证码不能为空" ControlToValidate="txtVerification"></asp:RequiredFieldValidator>
        </div>
        <div>
            <asp:Button ID="btnLogin" runat="server" Text="登录" OnClick="btnLogin_Click" BackColor="#007AFF" ForeColor="White" />
        </div>
    </form>
</body>
</html>
